/**
 * Copyright (c) Enalean, 2014 - 2016. All Rights Reserved.
 *
 * This file is a part of Tuleap.
 *
 * Tuleap is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Tuleap is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */
@import 'navbar';
@import 'sidebar';
@import 'content';
@import 'footer';
@import 'register';
@import 'keyboard-modal';
@import 'login';
@import 'widget';
@import 'avatar';
@import 'search';
@import 'tracker-v3';
@import 'phpwiki';
@import 'homepage';
@import 'account-confirmation';
@import 'admin';
@import 'project-confirmation';
@import 'trovecat';
@import 'user-home';
@import 'svn';
@import 'project-visibility';

/* Start BOOTSTRAP OVERRIDES */
h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.3em;
}

blockquote p {
    font-size: 1em;
}

input[type="file"] {
    margin-top: -13px;
}

.tooltip.in {
    opacity: 1;
}

.tooltip.right .tooltip-arrow {
    border-right-color: $dark-grey;
}

.tooltip-inner {
    background-color: $dark-grey;
}

.tour-backdrop {
    opacity: 0.3;
}

.popover[class*="tour"] {
    @import 'variables-blue';
    background: $main;
    color: $white;
    padding: 0;
    border: none;
    font-size: 0.85em;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);

    max-width: 370px;
    min-width: 370px;

    &.top .arrow:after {
        border-top-color: $main;
    }
    &.right .arrow:after {
        border-right-color: $main;
    }
    &.bottom .arrow:after {
        border-bottom-color: $dark-main;
    }
    &.left .arrow:after {
        border-left-color: $main;
    }

    .popover-title {
        background: $dark-main;
        color: $white;
        border: none;
        font-size: 1.1em;
    }

    .popover-navigation [data-role=prev], .popover-navigation [data-role=next] {
        float: left;
        margin-right: 5px;
    }
}

legend {
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.dropdown-menu {
    z-index: 3000;
}

.popover {
    z-index: 4000;

    .project-privacy {
        font-size: 0.9em;
    }
}

.modal {
    form {
        margin: 0;
    }
}

.dropdown-submenu.pull-left.glued > .dropdown-menu {
    left: 0%;
    margin: 0;
    transform: translateX(-100%);
}

/* End BOOTSTRAP OVERRIDES */

& {
    padding: $navbar-height 0 0 0;

    &.widgetable {
        background: #FCFCFC;
    }

    > .wrapper {
        min-height: 100%;
        position: relative;
    }

    &.has_sidebar.sidebar-collapsed {
        .sidebar-nav {
            width: 45px;

            .project-title-container {
                width: $sidebar-width;
                visibility: hidden;
            }

            li a {
                width: 45px;

                & > span {
                    display: none;
                }
            }

            .sidebar-about {
                display: none;
            }
        }

        .main {
            margin-left: 45px;
        }
    }

    .main {
        margin: 0;
    }

    &.has_sidebar .main {
        margin: 0 0 0 $sidebar-width;
    }

    &.admin_register {
        #register-form form label .label-help {
            display: none;
        }

        #register-background {
            background-color: #FFF;
            background-image: none;
        }
    }

    &.register-page:not(.admin_register) {
        > .wrapper {
            background-color: #FBFBFB;
        }
    }

    &.register-page {
        .content {
            background-color: #FBFBFB;
            padding: 0;
        }
    }

    &.search-page {
        .navbar-search, .header_searchbox {
            display: none;
        }
    }

    &.search-page .main .content {
        padding: 0px;
    }

    &.mediawiki .main .content {
        padding: 0px;
    }

    &.account-maintenance .main .content {
        padding: 0px;

        h3.account-title {
            font-size: 1.2em;

            i.help-button {
                vertical-align: initial;
            }
        }
    }
}
